<?php
header("Content-Type: text/html; charset=utf-8");
class SliceidgeneratorApiAction{
    private $__ch;
    public function __construct() {
            $this->__ch = 'aaaaaaaaa`';
        }
    public function getNextSliceId(){
        $ch = $this->__ch;
        $j = strlen($ch) - 1;
        while($j >= 0){
            $cj = $ch[$j];
            if ($cj != 'z'){
                $ch = substr($ch,0,$j) . chr((ord($cj) + 1)) . substr($ch,$j + 1);
                break;
            }   
            else{
                $ch = substr($ch,0,$j) . 'a' . substr($ch,$j + 1);
                $j = $j - 1;
            }
        }      
        $this->__ch = $ch;
        return $ch;
    }
        
}
?>